home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1498 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  733 b 

  1. Path: sierra.net!usenet
  2. From: TGColwell <snowbull@sierra.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Why use private class members instead of protected?
  5. Date: Wed, 10 Jan 1996 22:16:41 -0800
  6. Organization: Sierra-Net
  7. Message-ID: <30F4AB49.6ABB@sierra.net>
  8. NNTP-Posting-Host: 204.94.232.59
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b5 (WinNT; I)
  13.  
  14. I'm relatively new to c++.  I have one quick question:  If child 
  15. classes can only access protected members of the parent class, 
  16. why make any members of any class private?  Wouldn't it be 
  17. better to make members of the parent class protected so that the 
  18. class is alway "inheritance ready"?
  19.  
  20. Thanks in advance,
  21.  
  22. -Tyler
  23.